home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
vla
/
sincos
/
sincosdw.bas
< prev
next >
Wrap
BASIC Source File
|
1993-05-08
|
728b
|
30 lines
'
' Written by Draeden /VLA
'
' Feel free to use in any manner that pleases you.
' Creates a neat little chart of sin/cosine value.
'
' WARNING: Not to be taken internally
'
PI=3.1415926
NumAng = 256 'number of angle divisions per 2*pi
open "sincos.dw" for output as 1
print #1, "Sine dw ";
count = 0:MaxCount = 8
for Y=0 to NumAng * 1.25 -1
SI=INT(SIN(Y*2*PI/NumAng)*256 + .5)
if count > 0 then print #1, ",";
print #1, using "######"; si;
count = count +1
if y=NumAng/4-1 then
print #1, " ":Print #1,"Cosine dw ";
count = 0
Else
if count >= MaxCount and y < NumAng*1.25-1 Then
print #1, " ":print #1, " dw ";
count = 0
END if
End If
next